take the custom tab label from gtk_print_operation_set_custom_tab_label()
authorHans Breuer <hans@breuer.org>
Sat, 13 Jan 2007 22:18:06 +0000 (22:18 +0000)
committerHans Breuer <hans@src.gnome.org>
Sat, 13 Jan 2007 22:18:06 +0000 (22:18 +0000)
2007-01-13  Hans Breuer <hans@breuer.org>

* gtk/gtkprintoperation-win32.c : take the custom tab label from
gtk_print_operation_set_custom_tab_label() into account (bug #390746).

svn path=/trunk/; revision=17139

ChangeLog
gtk/gtkprintoperation-win32.c

index 06b9a5dfa05d435fae399164d62b83e2c3e2fd5b..6c6b2074c84bc31ada858d9bb217a40f23f9b093 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2007-01-13  Hans Breuer <hans@breuer.org>
 
+       * gtk/gtkprintoperation-win32.c : take the custom tab label from
+       gtk_print_operation_set_custom_tab_label() into account (bug #390746).
+
        * gtk/gtkimmulticontext.c : don't include "gtkprivate.h" to avoid
        differing definitions of GTK_LOCALEDIR (bug #396175).
 
index 7e815a372685d378d7be8e27c3c38d6b88802d36..1c034bfbfc394895d89af0bd4e2ab52ee5ae3293 100644 (file)
@@ -1356,7 +1356,7 @@ create_application_page (GtkPrintOperation *op)
   WORD baseunitX, baseunitY;
   WORD *array;
   GtkRequisition requisition;
-  const char *app_name;
+  const char *tab_label;
 
   /* Make the template the size of the custom widget size request */
   gtk_widget_size_request (op->priv->custom_widget, &requisition);
@@ -1386,10 +1386,13 @@ create_application_page (GtkPrintOperation *op)
   page.dwFlags = PSP_DLGINDIRECT | PSP_USETITLE | PSP_PREMATURE;
   page.hInstance = GetModuleHandle (NULL);
   page.pResource = template;
-  app_name = g_get_application_name ();
-  if (app_name == NULL)
-    app_name = _("Application");
-  page.pszTitle = g_utf8_to_utf16 (app_name, 
+  
+  tab_label = op->priv->custom_tab_label;
+  if (tab_label == NULL)
+    tab_label = g_get_application_name ();
+  if (tab_label == NULL)
+    tab_label = _("Application");
+  page.pszTitle = g_utf8_to_utf16 (tab_label, 
                                   -1, NULL, NULL, NULL);
   page.pfnDlgProc = pageDlgProc;
   page.pfnCallback = NULL;